CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CondReader Class Reference
Inheritance diagram for CondReader:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &evt, const edm::EventSetup &evtSetup) override
 
 CondReader (const edm::ParameterSet &iConfig)
 
 ~CondReader ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

unsigned long long since
 
unsigned long long till
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 19 of file CondReader.cc.

Constructor & Destructor Documentation

CondReader::CondReader ( const edm::ParameterSet iConfig)

Definition at line 32 of file CondReader.cc.

32  :
33  since(iConfig.getUntrackedParameter<unsigned long long>("since",0)),
34  till(iConfig.getUntrackedParameter<unsigned long long>("till",0))
35 {}
T getUntrackedParameter(std::string const &, T const &) const
unsigned long long till
Definition: CondReader.cc:28
unsigned long long since
Definition: CondReader.cc:27
CondReader::~CondReader ( )

Definition at line 37 of file CondReader.cc.

37 {}

Member Function Documentation

void CondReader::analyze ( const edm::Event evt,
const edm::EventSetup evtSetup 
)
overridevirtual

Implements edm::EDAnalyzer.

Definition at line 39 of file CondReader.cc.

References gather_cfg::cout, edm::EventSetup::get(), RPCObImon::ObImon_rpc, edm::ESHandle< class >::product(), since, till, cond::rpcobgas::time, and RPCFw::UTtoT().

40 {
41 
43 
45  evtSetup.get<RPCObImonRcd>().get(condRcd);
46  edm::LogInfo("CondReader") << "[CondReader::analyze] End Reading Cond" << std::endl;
47 
48  std::cout << "Run start: " << since << " - Run stop: " << till << std::endl;
49 
50  RPCFw time ("", "", "");
51  coral::TimeStamp sTime = time.UTtoT(since);
52  coral::TimeStamp tTime = time.UTtoT(till);
53  int ndateS = (sTime.day() * 10000) + (sTime.month() * 100) + (sTime.year()-2000);
54  int ntimeS = (sTime.hour() * 10000) + (sTime.minute() * 100) + sTime.second();
55  int ndateT = (tTime.day() * 10000) + (tTime.month() * 100) + (tTime.year()-2000);
56  int ntimeT = (tTime.hour() * 10000) + (tTime.minute() * 100) + tTime.second();
57  std::cout << "Run start: " << ndateS << " " << ntimeS << " - Run stop: " << ndateT << " " << ntimeT << std::endl;
58 
59  const RPCObImon* cond = condRcd.product();
60  std::vector<RPCObImon::I_Item> mycond = cond->ObImon_rpc;
61  std::vector<RPCObImon::I_Item>::iterator icond;
62 
63  std::cout << "************************************" << std::endl;
64  for(icond = mycond.begin(); icond < mycond.end(); ++icond){
65 
66  if (icond->day >= ndateS && icond->time >= ntimeS && icond->day <= ndateT && icond->time <= ntimeT)
67  std::cout<<"dpid = " << icond->dpid << " - value = " << icond->value << " - day = " << icond->day << " - time = " << icond->time << std::endl;
68  }
69 
70 }
Definition: RPCFw.h:32
unsigned long long till
Definition: CondReader.cc:28
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
std::vector< I_Item > ObImon_rpc
Definition: RPCObCond.h:27
unsigned long long since
Definition: CondReader.cc:27
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

unsigned long long CondReader::since
private

Definition at line 27 of file CondReader.cc.

Referenced by analyze().

unsigned long long CondReader::till
private

Definition at line 28 of file CondReader.cc.

Referenced by analyze().