55 Podd::Tokenize(
dtime,
" ", tok);
58 dt = tok[0]+
" "+tok[1]+
" "+tok[2]+
" "+tok[3]+
" "+tok[5];
59 const char*
r = strptime(dt.c_str(),
"%a %b %e %H:%M:%S %Y", &ts);
62 const char*
r = strptime(dt.c_str(),
"%a %b %e %H:%M:%S %Z %Y", &ts);
64 if( !
r ||
r-dt.c_str()-dt.length() != 0 )
72 cout <<
"\n\n====================== \n";
73 cout <<
"Print of Epics Data : "<<endl;
76 const vector<EpicsChan>& vepics = pm.second;
77 const string& tag = pm.first;
79 cout <<
"\n\nEpics Var #" << j;
80 cout <<
" Var Name = \""<<tag<<
"\""<<endl;
81 cout <<
"Size of epics vector "<<vepics.size();
82 for(
const auto&
chan : vepics ) {
83 cout <<
"\n Tag = " <<
chan.GetTag();
84 cout <<
" Evnum = " <<
chan.GetEvNum();
85 cout <<
" Date = " <<
chan.GetDate();
86 cout <<
" Timestamp = " <<
chan.GetTimeStamp();
87 cout <<
" Data = " <<
chan.GetData();
88 cout <<
" String = " <<
chan.GetString();
89 cout <<
" Units = " <<
chan.GetUnits();
98 const vector<EpicsChan> ep =
GetChan(tag);
105 const vector<EpicsChan> ep =
GetChan(tag);
108 return ep[k].GetData();
114 const vector<EpicsChan> ep =
GetChan(tag);
117 return ep[k].GetString();
123 const vector<EpicsChan> ep =
GetChan(tag);
126 return ep[k].GetTimeStamp();
148 UInt_t myidx = ep.size()-1;
149 if (
event == 0)
return myidx;
151 for(
size_t k = 0; k < ep.size(); k++ ) {
152 Long64_t diff =
event - ep[k].GetEvNum();
153 if( diff < 0 ) diff = -diff;
168 const string::size_type MAX_VAL_LEN = 32;
170 const char* cbuff = (
const char*)evbuffer;
171 size_t len =
sizeof(
UInt_t)*(evbuffer[0]+1);
172 if (
DEBUGL>1) cout <<
"Enter loadData, len = "<<
len<<endl;
173 if(
len<16 )
return 0;
179 string buf( cbuff,
len );
183 istringstream ib(buf);
184 if( !getline(ib,date) || date.size() < 16 ) {
185 cerr <<
"Invalid time stamp for EPICS event at evnum = " <<
event << endl;
188 if(
DEBUGL>1) cout <<
"Timestamp: " << date <<endl;
191 istringstream il, iv;
192 while( getline(ib,
line) ) {
194 if(
DEBUGL>2) cout <<
"epics line : "<<
line<<endl;
195 il.clear(); il.str(
line);
196 string wtag, wval, wunits;
198 if( wtag.empty() || wtag[0] == 0 )
continue;
199 istringstream::pos_type spos = il.tellg();
202 bool got_val =
false;
203 if( !wval.empty() && wval.length() <= MAX_VAL_LEN ) {
204 iv.clear(); iv.str(wval);
213 string::size_type lpos =
line.find_first_not_of(
" \t",spos);
214 wval = ( lpos != string::npos ) ?
line.substr(lpos) :
"";
217 if(
DEBUGL>2) cout <<
"wtag = "<<wtag<<
" wval = "<<wval
218 <<
" dval = "<<dval<<
" wunits = "<<wunits<<endl;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
static UInt_t FindEvent(const std::vector< EpicsChan > &ep, UInt_t event)
Double_t GetData(const char *tag, UInt_t event=0) const
std::map< std::string, std::vector< EpicsChan > > epicsData
std::string GetString(const char *tag, UInt_t event=0) const
Int_t LoadData(const UInt_t *evbuffer, UInt_t event=0)
time_t GetTimeStamp(const char *tag, UInt_t event=0) const
std::vector< EpicsChan > GetChan(const char *tag) const
Bool_t IsLoaded(const char *tag) const
double min(double x, double y)