11 #include "TApplication.h" 17 #include "cetlib_except/exception.h" 49 const char*
PrintTag()
const {
return "Test1"; }
51 static TText* t =
new TText(0.5,0.5,
"-");
54 sprintf(buff,
"%d",count);
56 t->SetText(0.5,0.5,buff);
101 wordexp( fEchoPrintFile.c_str(), &p, 0 );
103 fEchoPrintFile = std::string(*w);
109 std::string::size_type idx;
110 std::string extension;
111 idx = fEchoPrintFile.rfind(
'.');
112 if(idx != std::string::npos) {
113 extension = fEchoPrintFile.substr(idx);
120 <<
"No file extension given to EchoPrintFile " 122 <<
" so cannot determine file format, disabling EchoPrint\n";
133 std::vector<art::Worker*>
const&)
163 TApplication* app = gROOT->GetApplication();
181 throw cet::exception(
"EventDisplay") <<
"Cannot find AutoPrintPattern" 184 throw cet::exception(
"EventDisplay") <<
"Cannot find AutoPrintPattern" 207 <<
" tempfile successfully renamed to " 212 <<
" to " << fEchoPrintFile
213 <<
" " << strerror(errno) <<
"\n";
221 <<
"Random access for the EventDisplay requires a RootInput source for proper operation.\n" 222 <<
"You do not have a RootInput source so only sequential access works.\n";
252 <<
" -- reloading current event.";
261 <<
"EvengtDisplay in unhandled state " EventDisplay(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
static void RemoveFromListOfPrintables(evdb::Printable *p)
testCanvas1(TGMainFrame *mf)
static void Set(int which)
GlobalSignal< detail::SignalResponseType::FIFO, void()> sPostBeginJob
int fAutoPrintMax
How many events to print (zero = disable printing).
static ServiceTable & Instance()
const char * Description() const
Base class for printable objects.
#define DEFINE_ART_SERVICE(svc)
std::string fEchoPrintFile
The file to dump that .gif to. Only one file, if you want a different file for each event...
unsigned int fAutoAdvanceInterval
Wait time in milliseconds.
bool fEchoPrint
Copy what you see in X to a .gif for each event.
static void SetServicesAll()
void postBeginJobWorkers(art::InputSource *inputs, std::vector< art::Worker * > const &workers)
TCanvas * fCanvas
The ROOT drawing canvas.
virtual const char * PrintTag() const =0
std::string fEchoPrintTempFile
a temporary file to enable atomic writes
Manage all things related to colors for the event display.
Configure the ROOT environment.
Singleton to hold the current art::Event for the event display.
ART event display service.
GlobalSignal< detail::SignalResponseType::LIFO, void(InputSource *, std::vector< Worker * > const &)> sPostBeginJobWorkers
The interactive event display.
Base class for define a detector display.
Setup the root environment.
static std::map< std::string, evdb::Printable * > & GetPrintables()
static void SetRunEventAll(int run, int event)
static EventHolder * Instance()
void preProcessEvent(art::Event const &)
T get(std::string const &key) const
Holds information about what action to take next.
EventNumber_t event() const
const char * PrintTag() const
static evdb::RootEnv gsRootEnv(0, 0)
static void DrawAll(const char *opt=0)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
GlobalSignal< detail::SignalResponseType::FIFO, void(Event const &)> sPreProcessEvent
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
static SubRunID invalidSubRun(RunID const &rID)
EventNumber_t event() const
A window containing a display of the detector or one of its components.
GlobalSignal< detail::SignalResponseType::LIFO, void(Event const &)> sPostProcessEvent
void reconfigure(fhicl::ParameterSet const &pset)
static void AddToListOfPrintables(const char *name, evdb::Printable *p)
void postProcessEvent(art::Event const &)
int fAutoPrintCount
Number of events printed so far.
std::string fAutoPrintPattern
Pattern for printing output filenames. Must contain "%s" and "%d", in that order. ...
void SetEvent(art::Event const *evt)
cet::coded_exception< error, detail::translate > exception
art::InputSource * fInputSource
Input source of events.
virtual void Print(const char *filename)=0