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"
22 
23 #include "xdata/UnsignedInteger32.h"
24 #include "xdata/Boolean.h"
25 
26 #include <pthread.h>
27 
28 class DaqBaseReader;
30 
31 namespace edm {
32  class ParameterSet;
33  class Timestamp;
34  class InputSourceDescription;
35  class EventPrincipal;
36  class LuminosityBlockAuxiliary;
37 
38 
39  class DaqSource : public InputSource, private evf::ModuleWeb {
40 
41  public:
42  explicit DaqSource(const ParameterSet& pset,
43  const InputSourceDescription& desc);
44 
45  virtual ~DaqSource();
46 
47  private:
48 
50  virtual EventPrincipal* readEvent_(EventPrincipal& eventPrincipal);
51  virtual boost::shared_ptr<LuminosityBlockAuxiliary> readLuminosityBlockAuxiliary_();
52  virtual boost::shared_ptr<RunAuxiliary> readRunAuxiliary_();
53  virtual EventPrincipal* readIt(EventID const& eventID);
54  virtual void skip(int offset);
55  virtual void setLumi(LuminosityBlockNumber_t lb);
56  virtual void setRun(RunNumber_t r);
57  //virtual void doBeginRun(edm::EventPrincipal &rp);
58  virtual ItemType getNextItemType();
59 
60 
61  int doMyBeginRun();
62  virtual void publish(xdata::InfoSpace *);
63  virtual void publishToXmas(xdata::InfoSpace *);
64  virtual void publishForkInfo(evf::moduleweb::ForkInfoObj * forkInfoObj);
65  virtual void openBackDoor(unsigned int,bool*);
66  virtual void closeBackDoor();
67  virtual void signalWaitingThreadAndBlock();
68 
70  unsigned int lumiSegmentSizeInEvents_; //temporary kludge, LS# will come from L1 Global record
71  unsigned int lumiSegmentSizeInSeconds_; //temporary kludge, LS# will come from L1 Global record
73  bool useTimer_;
74  unsigned int eventCounter_;
76  bool fakeLSid_;
77 
84 
85  pthread_mutex_t mutex_;
86  pthread_mutex_t signal_lock_;
87  pthread_cond_t cond_;
88  xdata::UnsignedInteger32 *lumiSectionIndex_;
89  xdata::UnsignedInteger32 *prescaleSetIndex_;
90  xdata::UnsignedInteger32 *lastLumiPrescaleIndex_;
91  xdata::UnsignedInteger32 *lastLumiUsingEol_;
92  xdata::Boolean *lsTimedOut_;
93  xdata::Boolean *lsToBeRecovered_;
94  xdata::InfoSpace *is_;
95  xdata::InfoSpace *mis_;
96  int count;
97  unsigned int thisEventLSid;
99  struct timeval startOfLastLumi;
102  bool runFork_;
103  timeval tvStat_;
110  };
111 
112 }
113 
114 #endif
DaqBaseReader * reader_
Definition: DaqSource.h:69
xdata::InfoSpace * mis_
Definition: DaqSource.h:95
int doMyBeginRun()
Definition: DaqSource.cc:149
ProcessHistoryID phid_
Definition: DaqSource.h:81
xdata::Boolean * lsTimedOut_
Definition: DaqSource.h:92
evf::moduleweb::ForkInfoObj * forkInfo_
Definition: DaqSource.h:101
#define Input(cl)
Definition: vmac.h:189
LuminosityBlockNumber_t luminosityBlockNumber_
Definition: DaqSource.h:79
virtual void closeBackDoor()
Definition: DaqSource.cc:692
virtual ItemType getNextItemType()
Definition: DaqSource.cc:228
xdata::UnsignedInteger32 * lumiSectionIndex_
Definition: DaqSource.h:88
virtual boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
Definition: DaqSource.cc:583
unsigned int eventCounter_
Definition: DaqSource.h:74
xdata::Boolean * lsToBeRecovered_
Definition: DaqSource.h:93
virtual void publish(xdata::InfoSpace *)
Definition: DaqSource.cc:655
virtual EventPrincipal * readEvent_(EventPrincipal &eventPrincipal)
Definition: DaqSource.cc:593
timeval tvStat_
Definition: DaqSource.h:103
DaqProvenanceHelper daqProvenanceHelper_
Definition: DaqSource.h:80
virtual void publishToXmas(xdata::InfoSpace *)
Definition: DaqSource.cc:665
xdata::UnsignedInteger32 * lastLumiUsingEol_
Definition: DaqSource.h:91
RunNumber_t runNumber_
Definition: DaqSource.h:78
bool useTimer_
Definition: DaqSource.h:73
pthread_cond_t cond_
Definition: DaqSource.h:87
unsigned int LuminosityBlockNumber_t
Definition: EventID.h:31
FEDRawDataCollection * fedCollection_
Definition: DaqSource.h:109
pthread_mutex_t signal_lock_
Definition: DaqSource.h:86
bool fakeLSid_
Definition: DaqSource.h:76
xdata::UnsignedInteger32 * prescaleSetIndex_
Definition: DaqSource.h:89
virtual void signalWaitingThreadAndBlock()
Definition: DaqSource.cc:702
bool keepUsingPsidFromTrigger_
Definition: DaqSource.h:75
unsigned int offset(bool)
virtual void publishForkInfo(evf::moduleweb::ForkInfoObj *forkInfoObj)
Definition: DaqSource.cc:136
bool goToStopping
Definition: DaqSource.h:98
DaqSource(const ParameterSet &pset, const InputSourceDescription &desc)
Definition: DaqSource.cc:55
int bunchCrossing_
Definition: DaqSource.h:105
tuple out
Definition: dbtoconf.py:99
EventAuxiliary::ExperimentType evttype_
Definition: DaqSource.h:107
virtual void skip(int offset)
Definition: DaqSource.cc:649
virtual void setRun(RunNumber_t r)
Definition: DaqSource.cc:562
bool beginRunTiming_
Definition: DaqSource.h:104
void defaultWebPage(xgi::Input *in, xgi::Output *out)
Definition: DaqSource.cc:717
unsigned int lumiSegmentSizeInSeconds_
Definition: DaqSource.h:71
unsigned int lumiSegmentSizeInEvents_
Definition: DaqSource.h:70
virtual void openBackDoor(unsigned int, bool *)
Definition: DaqSource.cc:670
virtual EventPrincipal * readIt(EventID const &eventID)
Definition: DaqSource.cc:642
bool useEventCounter_
Definition: DaqSource.h:72
EventID eventID_
Definition: DaqSource.h:108
#define Output(cl)
Definition: vmac.h:193
virtual ~DaqSource()
Definition: DaqSource.cc:132
pthread_mutex_t mutex_
Definition: DaqSource.h:85
struct timeval startOfLastLumi
Definition: DaqSource.h:99
unsigned int thisEventLSid
Definition: DaqSource.h:97
unsigned int RunNumber_t
Definition: EventRange.h:32
bool noMoreEvents_
Definition: DaqSource.h:82
virtual void setLumi(LuminosityBlockNumber_t lb)
Definition: DaqSource.cc:635
virtual boost::shared_ptr< RunAuxiliary > readRunAuxiliary_()
Definition: DaqSource.cc:573
bool immediateStop
Definition: DaqSource.h:100
xdata::InfoSpace * is_
Definition: DaqSource.h:94
xdata::UnsignedInteger32 * lastLumiPrescaleIndex_
Definition: DaqSource.h:90
bool alignLsToLast_
Definition: DaqSource.h:83