23 fIsOnline = GetBool(
"IsOnline",
false,
false);
24 fRunDataOwner = GetString(
"RunDataOwner",
"DAQ",
false);
25 fRunDataInput = GetString(
"Input" ,
"DB");
26 fRunDataOutputFile = GetString(
"Output",
"",
false);
27 fWriteIntoEvent = GetBool(
"WriteIntoEvent",
false,
false);
31 fSaveRunData = (fRunDataOutputFile !=
"");
33 fRunDataOutputFile2 = GetString(
"Output2",
"",
false);
37 int dataset = GetInt(
"Dataset",-1,
false);
42 GlobalHandle<QInt> dHandle(
"Dataset");
44 GlobalData().Set(&dHandle,
"");
46 fRunsInput = GetString(
"RunsInput",fRunDataInput,
false);
52 const int currRun = raw.
GetRun();
55 if(currRun != fThisRun) {
65 GlobalData().Get(fRunDataOwner,&rdh,fRunDataInput);
67 Error(
"RunData is not valid for run %d. Error: %s",fThisRun,rdh.GetError().GetDescription().c_str());
74 GlobalData().Set(&rdh,fRunDataOutputFile);
75 if(fRunDataOutputFile2 !=
"")
76 GlobalData().Set(&rdh,fRunDataOutputFile2);
80 std::stringstream dump;
82 Info(
"%s",dump.str().c_str());
84 GlobalHandle<QInt> dHandle(
"Dataset");
85 GlobalData().Get(&dHandle,
"");
86 if(dHandle.IsValid() && fRunsInput !=
"NONE") {
96 if(fRunData.IsValid()) {
100 GlobalHandle<QInt> dHandle(
"Dataset");
101 GlobalData().Get(&dHandle,
"");
102 if(dHandle.IsValid()) {
103 ev.
Get<
QInt>(
"Dataset") = dHandle.Get();
#define REGISTER_MODULE(clazz)
Module to load commonly used run and detector information.
virtual void Do(Diana::QEvent &ev)
virtual ~MRunDataLoader()
virtual void Init(Diana::QEvent &ev)
base types wrapped into a QObject. Currently implemented types are QInt QDouble and QFloat....
basic channel and run based info. Used in the QRunData object.
void Require(const std::string &owner, const std::string &name) const
notify the QEvent that we need a QObject, if not found an exception is thrown
void Get(const char *owner, ReadHandle< Q > &handle) const
Get a QObject Handle in read mode.
void Add(WriteHandle< Q > &handle)
Add a QObject to the event.
Raw event: bolometer channel, trigger positions and types.
const int & GetChannelId() const
Get ChannelId.
global handle for QRunData
void SetIsOnline(bool isOnline=true)
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...