13 #include <TDirectory.h>
23 InitJANAPlugin(locApplication);
47 gPARMS->SetDefaultParameter(
"SUMMARY:VERBOSE",
VERBOSE,
48 "Verbosity level for creating summary values. 0=no messages, 10=all messages");
50 cout <<
"Run summary verbosity level = " <<
VERBOSE << endl;
65 japp->RootWriteLock();
69 TDirectory *main_dir = gDirectory;
72 TDirectory* plugin_dir =
static_cast<TDirectory*
>(gDirectory->GetDirectory(
"conditions"));
73 if(plugin_dir == NULL)
74 plugin_dir = gDirectory->mkdir(
"conditions");
77 if(gDirectory->Get(
"conditions") == NULL)
115 vector<const DEPICSvalue*> epicsvalues;
116 locEventLoop->Get(epicsvalues);
119 for(vector<const DEPICSvalue*>::const_iterator val_itr = epicsvalues.begin();
120 val_itr != epicsvalues.end(); val_itr++) {
123 cout <<
"EPICS: " << epics_val->
name <<
" = " << epics_val->
sval << endl;
128 jerr <<
"EPICS store object not loaded!" << endl;
148 japp->RootWriteLock();
152 if(run_branch == NULL)
159 for(map<string, DEPICSvalue_data_t>::const_iterator epics_val_itr = epics_store.begin();
160 epics_val_itr != epics_store.end(); epics_val_itr++) {
161 string branch_name = epics_val_itr->first;
164 std::replace( branch_name.begin(), branch_name.end(),
':',
'_');
166 std::replace( branch_name.begin(), branch_name.end(),
'-',
'_');
167 std::replace( branch_name.begin(), branch_name.end(),
'+',
'_');
168 std::replace( branch_name.begin(), branch_name.end(),
'*',
'_');
169 std::replace( branch_name.begin(), branch_name.end(),
'/',
'_');
170 TBranch *the_branch =
conditions_tree->FindBranch(branch_name.c_str());
171 if(the_branch == NULL) {
172 string branch_def = branch_name +
"/D";
173 conditions_tree->Branch(branch_name.c_str(), &(epics_val_itr->second.value->fval), branch_def.c_str());
175 conditions_tree->SetBranchAddress(branch_name.c_str(), &(epics_val_itr->second.value->fval));
void AddValue(const DEPICSvalue *new_value)
jerror_t erun(void)
Called every time run number changes, provided brun has been called.
jerror_t brun(jana::JEventLoop *locEventLoop, int locRunNumber)
Called every time a new run number is detected.
map< string, DEPICSvalue_data_t > & GetStore()
jerror_t init(void)
Called once at program start.
jerror_t evnt(jana::JEventLoop *locEventLoop, uint64_t locEventNumber)
Called every event.
jerror_t fini(void)
Called after last event of last event source has been processed.
A DEPICSvalue object holds information for a single EPICS value read from the data stream...