CMS 3D CMS Logo

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 () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

unsigned long long since
 
unsigned long long till
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 19 of file CondReader.cc.

Constructor & Destructor Documentation

◆ CondReader()

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

Definition at line 31 of file CondReader.cc.

32  : since(iConfig.getUntrackedParameter<unsigned long long>("since", 0)),
33  till(iConfig.getUntrackedParameter<unsigned long long>("till", 0)) {}

◆ ~CondReader()

CondReader::~CondReader ( )
override

Definition at line 35 of file CondReader.cc.

35 {}

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 37 of file CondReader.cc.

37  {
39 
41  evtSetup.get<RPCObImonRcd>().get(condRcd);
42  edm::LogInfo("CondReader") << "[CondReader::analyze] End Reading Cond" << std::endl;
43 
44  std::cout << "Run start: " << since << " - Run stop: " << till << std::endl;
45 
46  RPCFw time("", "", "");
47  coral::TimeStamp sTime = time.UTtoT(since);
48  coral::TimeStamp tTime = time.UTtoT(till);
49  int ndateS = (sTime.day() * 10000) + (sTime.month() * 100) + (sTime.year() - 2000);
50  int ntimeS = (sTime.hour() * 10000) + (sTime.minute() * 100) + sTime.second();
51  int ndateT = (tTime.day() * 10000) + (tTime.month() * 100) + (tTime.year() - 2000);
52  int ntimeT = (tTime.hour() * 10000) + (tTime.minute() * 100) + tTime.second();
53  std::cout << "Run start: " << ndateS << " " << ntimeS << " - Run stop: " << ndateT << " " << ntimeT << std::endl;
54 
55  const RPCObImon* cond = condRcd.product();
56  std::vector<RPCObImon::I_Item> mycond = cond->ObImon_rpc;
57  std::vector<RPCObImon::I_Item>::iterator icond;
58 
59  std::cout << "************************************" << std::endl;
60  for (icond = mycond.begin(); icond < mycond.end(); ++icond) {
61  if (icond->day >= ndateS && icond->time >= ntimeS && icond->day <= ndateT && icond->time <= ntimeT)
62  std::cout << "dpid = " << icond->dpid << " - value = " << icond->value << " - day = " << icond->day
63  << " - time = " << icond->time << std::endl;
64  }
65 }

References gather_cfg::cout, edm::EventSetup::get(), get, edm::ESHandle< T >::product(), since, till, and ntuplemaker::time.

Member Data Documentation

◆ since

unsigned long long CondReader::since
private

Definition at line 27 of file CondReader.cc.

Referenced by analyze().

◆ till

unsigned long long CondReader::till
private

Definition at line 28 of file CondReader.cc.

Referenced by analyze().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
RPCObImon
Definition: RPCObCond.h:15
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::LogInfo
Definition: MessageLogger.h:254
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
RPCObImonRcd
Definition: RPCObCondRcd.h:24
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
CondReader::since
unsigned long long since
Definition: CondReader.cc:27
edm::ESHandle
Definition: DTSurvey.h:22
cond
Definition: plugin.cc:23
RPCFw
Definition: RPCFw.h:29
edm::Service< cond::service::PoolDBOutputService >
get
#define get
CondReader::till
unsigned long long till
Definition: CondReader.cc:28
ntuplemaker.time
time
Definition: ntuplemaker.py:310