CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CondReader Class Reference
Inheritance diagram for CondReader:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase 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::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

edm::ESGetToken< RPCObImon, RPCObImonRcdcondRcd_token_
 
unsigned long long since
 
unsigned long long till
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 18 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)),
unsigned long long till
Definition: CondReader.cc:27
edm::ESGetToken< RPCObImon, RPCObImonRcd > condRcd_token_
Definition: CondReader.cc:28
T getUntrackedParameter(std::string const &, T const &) const
unsigned long long since
Definition: CondReader.cc:26

◆ ~CondReader()

CondReader::~CondReader ( )
override

Definition at line 36 of file CondReader.cc.

36 {}

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 38 of file CondReader.cc.

References condRcd_token_, gather_cfg::cout, edm::EventSetup::getData(), since, till, and hcalRecHitTable_cff::time.

38  {
40 
41  const RPCObImon* cond = &evtSetup.getData(condRcd_token_);
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  std::vector<RPCObImon::I_Item> mycond = cond->ObImon_rpc;
56  std::vector<RPCObImon::I_Item>::iterator icond;
57 
58  std::cout << "************************************" << std::endl;
59  for (icond = mycond.begin(); icond < mycond.end(); ++icond) {
60  if (icond->day >= ndateS && icond->time >= ntimeS && icond->day <= ndateT && icond->time <= ntimeT)
61  std::cout << "dpid = " << icond->dpid << " - value = " << icond->value << " - day = " << icond->day
62  << " - time = " << icond->time << std::endl;
63  }
64 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
Definition: RPCFw.h:29
unsigned long long till
Definition: CondReader.cc:27
edm::ESGetToken< RPCObImon, RPCObImonRcd > condRcd_token_
Definition: CondReader.cc:28
Log< level::Info, false > LogInfo
unsigned long long since
Definition: CondReader.cc:26

Member Data Documentation

◆ condRcd_token_

edm::ESGetToken<RPCObImon, RPCObImonRcd> CondReader::condRcd_token_
private

Definition at line 28 of file CondReader.cc.

Referenced by analyze().

◆ since

unsigned long long CondReader::since
private

Definition at line 26 of file CondReader.cc.

Referenced by analyze().

◆ till

unsigned long long CondReader::till
private

Definition at line 27 of file CondReader.cc.

Referenced by analyze().