Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:19

0001 /**
0002  * \class L1GtCastorTemplate
0003  *
0004  *
0005  * Description: L1 Global Trigger CASTOR template.
0006  *
0007  * Implementation:
0008  *    Instantiated L1GtCondition. CASTOR conditions sends a logical result only.
0009  *    No changes are possible at the L1 GT level. CASTOR conditions can be used
0010  *    in physics algorithms in combination with muon, calorimeter, energy sum
0011  *    and jet-counts conditions.
0012  *    It has zero objects.
0013  *
0014  * \author: Vasile Mihai Ghete - HEPHY Vienna
0015  *
0016  * $Date$
0017  * $Revision$
0018  *
0019  */
0020 
0021 // this class header
0022 #include "CondFormats/L1TObjects/interface/L1GtCastorTemplate.h"
0023 
0024 // system include files
0025 
0026 #include <iostream>
0027 #include <iomanip>
0028 
0029 // user include files
0030 
0031 //   base class
0032 
0033 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0034 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0035 
0036 // forward declarations
0037 
0038 // constructors
0039 L1GtCastorTemplate::L1GtCastorTemplate() : L1GtCondition() {
0040   m_condCategory = CondCastor;
0041   m_condType = TypeCastor;
0042 }
0043 
0044 L1GtCastorTemplate::L1GtCastorTemplate(const std::string& cName) : L1GtCondition(cName) {
0045   m_condCategory = CondCastor;
0046   m_condType = TypeCastor;
0047 }
0048 
0049 L1GtCastorTemplate::L1GtCastorTemplate(const std::string& cName, const L1GtConditionType& cType)
0050     : L1GtCondition(cName, CondEnergySum, cType) {
0051   m_condCategory = CondCastor;
0052   m_condType = TypeCastor;
0053 
0054   // actually no objects are sent by CASTOR, only the result of the condition
0055   int nObjects = nrObjects();
0056 
0057   if (nObjects > 0) {
0058     m_objectType.reserve(nObjects);
0059   }
0060 }
0061 
0062 // copy constructor
0063 L1GtCastorTemplate::L1GtCastorTemplate(const L1GtCastorTemplate& cp) : L1GtCondition(cp.m_condName) { copy(cp); }
0064 
0065 // destructor
0066 L1GtCastorTemplate::~L1GtCastorTemplate() {
0067   // empty now
0068 }
0069 
0070 // assign operator
0071 L1GtCastorTemplate& L1GtCastorTemplate::operator=(const L1GtCastorTemplate& cp) {
0072   copy(cp);
0073   return *this;
0074 }
0075 
0076 void L1GtCastorTemplate::print(std::ostream& myCout) const {
0077   myCout << "\n  L1GtCastorTemplate print..." << std::endl;
0078 
0079   L1GtCondition::print(myCout);
0080 
0081   // reset to decimal output
0082   myCout << std::dec << std::endl;
0083 }
0084 
0085 void L1GtCastorTemplate::copy(const L1GtCastorTemplate& cp) {
0086   m_condName = cp.condName();
0087   m_condCategory = cp.condCategory();
0088   m_condType = cp.condType();
0089   m_objectType = cp.objectType();
0090   m_condGEq = cp.condGEq();
0091   m_condChipNr = cp.condChipNr();
0092 }
0093 
0094 // output stream operator
0095 std::ostream& operator<<(std::ostream& os, const L1GtCastorTemplate& result) {
0096   result.print(os);
0097   return os;
0098 }