CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DaqSource.h
Go to the documentation of this file.
1 #ifndef DaqSource_DaqSource_H
2 #define DaqSource_DaqSource_H
3 
13 #include <memory>
14 #include "boost/shared_ptr.hpp"
20 
21 #include "xdata/UnsignedInteger32.h"
22 #include "xdata/Boolean.h"
23 
24 #include <pthread.h>
25 
26 class DaqBaseReader;
27 
28 namespace edm {
29  class ParameterSet;
30  class Timestamp;
31  class InputSourceDescription;
32  class EventPrincipal;
33  class LuminosityBlockAuxiliary;
34 
35 
36  class DaqSource : public InputSource, private evf::ModuleWeb {
37 
38  public:
39  explicit DaqSource(const ParameterSet& pset,
40  const InputSourceDescription& desc);
41 
42  virtual ~DaqSource();
43 
44  private:
45 
47  virtual EventPrincipal* readEvent_();
48  virtual boost::shared_ptr<LuminosityBlockAuxiliary> readLuminosityBlockAuxiliary_();
49  virtual boost::shared_ptr<RunAuxiliary> readRunAuxiliary_();
50  virtual EventPrincipal* readIt(EventID const& eventID);
51  virtual void skip(int offset);
52  virtual void setLumi(LuminosityBlockNumber_t lb);
53  virtual void setRun(RunNumber_t r);
54  //virtual void doBeginRun(edm::EventPrincipal &rp);
55  virtual ItemType getNextItemType();
56 
57 
58  int doMyBeginRun();
59  virtual void publish(xdata::InfoSpace *);
60  virtual void publishToXmas(xdata::InfoSpace *);
61  virtual void publishForkInfo(evf::moduleweb::ForkInfoObj * forkInfoObj);
62  virtual void openBackDoor(unsigned int,bool*);
63  virtual void closeBackDoor();
64  virtual void signalWaitingThreadAndBlock();
65 
67  unsigned int lumiSegmentSizeInEvents_; //temporary kludge, LS# will come from L1 Global record
69  unsigned int eventCounter_;
71  bool fakeLSid_;
72 
78  bool newRun_;
79  bool newLumi_;
82 
83  pthread_mutex_t mutex_;
84  pthread_mutex_t signal_lock_;
85  pthread_cond_t cond_;
86  xdata::UnsignedInteger32 *lumiSectionIndex_;
87  xdata::UnsignedInteger32 *prescaleSetIndex_;
88  xdata::UnsignedInteger32 *lastLumiPrescaleIndex_;
89  xdata::UnsignedInteger32 *lastLumiUsingEol_;
90  xdata::Boolean *lsTimedOut_;
91  xdata::Boolean *lsToBeRecovered_;
92  xdata::InfoSpace *is_;
93  xdata::InfoSpace *mis_;
94  int count;
95  unsigned int thisEventLSid;
99  bool runFork_;
100  timeval tvStat_;
102  };
103 
104 }
105 
106 #endif
DaqBaseReader * reader_
Definition: DaqSource.h:66
xdata::InfoSpace * mis_
Definition: DaqSource.h:93
int doMyBeginRun()
Definition: DaqSource.cc:134
ProcessHistoryID phid_
Definition: DaqSource.h:76
xdata::Boolean * lsTimedOut_
Definition: DaqSource.h:90
evf::moduleweb::ForkInfoObj * forkInfo_
Definition: DaqSource.h:98
#define Input(cl)
Definition: vmac.h:189
LuminosityBlockNumber_t luminosityBlockNumber_
Definition: DaqSource.h:74
virtual void closeBackDoor()
Definition: DaqSource.cc:634
virtual ItemType getNextItemType()
Definition: DaqSource.cc:213
xdata::UnsignedInteger32 * lumiSectionIndex_
Definition: DaqSource.h:86
virtual boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
Definition: DaqSource.cc:549
unsigned int eventCounter_
Definition: DaqSource.h:69
xdata::Boolean * lsToBeRecovered_
Definition: DaqSource.h:91
virtual void publish(xdata::InfoSpace *)
Definition: DaqSource.cc:597
timeval tvStat_
Definition: DaqSource.h:100
DaqProvenanceHelper daqProvenanceHelper_
Definition: DaqSource.h:75
virtual void publishToXmas(xdata::InfoSpace *)
Definition: DaqSource.cc:607
xdata::UnsignedInteger32 * lastLumiUsingEol_
Definition: DaqSource.h:89
RunNumber_t runNumber_
Definition: DaqSource.h:73
pthread_cond_t cond_
Definition: DaqSource.h:85
unsigned int LuminosityBlockNumber_t
Definition: EventID.h:31
pthread_mutex_t signal_lock_
Definition: DaqSource.h:84
bool fakeLSid_
Definition: DaqSource.h:71
xdata::UnsignedInteger32 * prescaleSetIndex_
Definition: DaqSource.h:87
virtual void signalWaitingThreadAndBlock()
Definition: DaqSource.cc:643
bool keepUsingPsidFromTrigger_
Definition: DaqSource.h:70
unsigned int offset(bool)
virtual void publishForkInfo(evf::moduleweb::ForkInfoObj *forkInfoObj)
Definition: DaqSource.cc:121
bool goToStopping
Definition: DaqSource.h:96
DaqSource(const ParameterSet &pset, const InputSourceDescription &desc)
Definition: DaqSource.cc:56
tuple out
Definition: dbtoconf.py:99
virtual void skip(int offset)
Definition: DaqSource.cc:591
virtual void setRun(RunNumber_t r)
Definition: DaqSource.cc:528
bool beginRunTiming_
Definition: DaqSource.h:101
void defaultWebPage(xgi::Input *in, xgi::Output *out)
Definition: DaqSource.cc:656
unsigned int lumiSegmentSizeInEvents_
Definition: DaqSource.h:67
virtual void openBackDoor(unsigned int, bool *)
Definition: DaqSource.cc:612
virtual EventPrincipal * readIt(EventID const &eventID)
Definition: DaqSource.cc:584
bool useEventCounter_
Definition: DaqSource.h:68
#define Output(cl)
Definition: vmac.h:193
virtual ~DaqSource()
Definition: DaqSource.cc:117
pthread_mutex_t mutex_
Definition: DaqSource.h:83
bool eventCached_
Definition: DaqSource.h:80
unsigned int thisEventLSid
Definition: DaqSource.h:95
unsigned int RunNumber_t
Definition: EventRange.h:32
bool noMoreEvents_
Definition: DaqSource.h:77
virtual void setLumi(LuminosityBlockNumber_t lb)
Definition: DaqSource.cc:577
virtual boost::shared_ptr< RunAuxiliary > readRunAuxiliary_()
Definition: DaqSource.cc:539
bool immediateStop
Definition: DaqSource.h:97
xdata::InfoSpace * is_
Definition: DaqSource.h:92
xdata::UnsignedInteger32 * lastLumiPrescaleIndex_
Definition: DaqSource.h:88
virtual EventPrincipal * readEvent_()
Definition: DaqSource.cc:561
bool alignLsToLast_
Definition: DaqSource.h:81