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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 ( )
override

Definition at line 37 of file CondReader.cc.

37 {}

Member Function Documentation

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

Definition at line 39 of file CondReader.cc.

References gather_cfg::cout, DEFINE_FWK_MODULE, edm::EventSetup::get(), RPCObImon::ObImon_rpc, edm::ESHandle< T >::product(), since, till, protons_cff::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
std::vector< I_Item > ObImon_rpc
Definition: RPCObCond.h:27
unsigned long long since
Definition: CondReader.cc:27
Definition: plugin.cc:24
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86

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().