![]()  | 
  
    GRSISort "v4.0.0.5"
    
   An extension of the ROOT analysis Framework 
   | 
  ![]()  | 
 
TGRSIint is a class that acts as an interpreter for GRSISort. The idea is that TGRSIint will read in cal, info, mid and root files and open them appropriately (order) and do the correct thing with them. It also applies the command line options. Finally, TGRSIint allows us to take over the interpreter to do some GRSI things.
Definition at line 39 of file TGRSIint.h.
Public Member Functions | |
| TGRSIint (const TGRSIint &)=delete | |
| TGRSIint (TGRSIint &&) noexcept=delete | |
| ~TGRSIint ()=default | |
| void | DelayedProcessLine_Action () | 
| bool | HandleTermInput () override | 
| TRawFile * | OpenRawFile (const std::string &filename) | 
| TFile * | OpenRootFile (const std::string &filename, Option_t *opt="read") | 
| TGRSIint & | operator= (const TGRSIint &)=delete | 
| TGRSIint & | operator= (TGRSIint &&) noexcept=delete | 
| void | PrintLogo (bool) override | 
| Long_t | ProcessLine (const char *line, Bool_t sync=kFALSE, Int_t *error=nullptr) override | 
| void | RunMacroFile (const std::string &filename) | 
| int | TabCompletionHook (char *, int *, std::ostream &) override | 
| void | Terminate (Int_t status=0) override | 
Static Public Member Functions | |
| static TEnv * | GetEnv () | 
| static TGRSIint * | instance (int argc=0, char **argv=nullptr, void *options=nullptr, int numOptions=-1, bool noLogo=false, const char *appClassName="grsisort") | 
| static void | PrintHelp (bool) | 
Static Public Attributes | |
| static TGRSIint * | fTGRSIint = nullptr | 
Private Member Functions | |
| TGRSIint (int argc, char **argv, void *options=nullptr, int numOptions=0, bool noLogo=false, const char *appClassName="grsisort") | |
| void | ApplyOptions () | 
| Long_t | DelayedProcessLine (std::string command) | 
| void | LoadExtraClasses () | 
| void | LoopUntilDone () | 
| void | SetupPipeline () | 
Static Private Member Functions | |
| static void | DrawLogo () | 
| static void | LoadGROOTGraphics () | 
Private Attributes | |
| bool | fAllowedToTerminate | 
| int | fFakeArgc {0} | 
| bool | fIsTabComplete | 
| TTimer * | fKeepAliveTimer | 
| std::string | fNewFragmentFile | 
| std::vector< TRawFile * > | fRawFiles | 
| int | fRawFilesOpened | 
| int | fRootFilesOpened | 
| std::thread::id | main_thread_id | 
Static Private Attributes | |
| static TEnv * | fGRSIEnv = nullptr | 
 Inheritance diagram for TGRSIint:
 Collaboration diagram for TGRSIint:
      
  | 
  private | 
Singleton constructor
Definition at line 65 of file TGRSIint.cxx.
References fGRSIEnv, TGRSIOptions::Get(), PrintLogo(), and TGRSIOptions::ShouldExit().
Referenced by instance().
      
  | 
  delete | 
      
  | 
  deletenoexcept | 
      
  | 
  default | 
      
  | 
  private | 
Applies options from TGRSIOptions. This include things such as batch sorting, reading material, and logo. Also includes the setup of what to do with mid and root files that are input.
Definition at line 92 of file TGRSIint.cxx.
References AllFilesExist(), StoppableThread::AllThreadHeader(), TGRSIOptions::Batch(), TRunInfo::ClearDate(), TRunInfo::ClearFullVersion(), TRunInfo::ClearVersion(), TGRSIOptions::CloseAfterSort(), DRED, TGRSIOptions::Get(), TSingleton< TParserLibrary >::Get(), TGRSIOptions::InputFiles(), TParserLibrary::Load(), LoadGROOTGraphics(), LoopUntilDone(), TGRSIOptions::MacroInputFiles(), OpenRawFile(), OpenRootFile(), TGRSIOptions::ParserLibrary(), TGRSIOptions::ReadingMaterial(), ReadTheNews(), RESET_COLOR, TGRSIOptions::RootInputFiles(), RunMacroFile(), TRunInfo::SetDate(), TRunInfo::SetFullVersion(), SetupPipeline(), TRunInfo::SetVersion(), StartGUI(), TGRSIOptions::StartGui(), and Terminate().
Referenced by instance().
      
  | 
  private | 
Definition at line 801 of file TGRSIint.cxx.
Referenced by ProcessLine().
| void TGRSIint::DelayedProcessLine_Action | ( | ) | 
Definition at line 818 of file TGRSIint.cxx.
References ProcessLine().
      
  | 
  staticprivate | 
Draws the logo. Can be suppressed with -l
Definition at line 725 of file TGRSIint.cxx.
References PopupLogo(), and WaitLogo().
Referenced by PrintLogo().
      
  | 
  inlinestatic | 
Definition at line 68 of file TGRSIint.h.
References fGRSIEnv.
      
  | 
  override | 
Handles terminal input via TRint
Definition at line 189 of file TGRSIint.cxx.
      
  | 
  static | 
Singleton constructor instance
Definition at line 55 of file TGRSIint.cxx.
References TGRSIint(), ApplyOptions(), and fTGRSIint.
Referenced by main(), TGRSIInterruptHandler::Notify(), TAnalysisHistLoop::OpenFile(), and TFragHistLoop::OpenFile().
      
  | 
  private | 
      
  | 
  staticprivate | 
Loads root graphics in unless -b is used for batch mode.
Definition at line 732 of file TGRSIint.cxx.
Referenced by ApplyOptions().
      
  | 
  private | 
Outputs the thread status until all of the threads are complete.
Definition at line 166 of file TGRSIint.cxx.
References StoppableThread::AllThreadProgress(), StoppableThread::AllThreadStatus(), StoppableThread::AnyThreadRunning(), fAllowedToTerminate, and TGRSIOptions::Get().
Referenced by ApplyOptions(), and Terminate().
| TRawFile * TGRSIint::OpenRawFile | ( | const std::string & | filename | ) | 
Opens Raw input file and stores them in _raw if successfuly opened.
Definition at line 385 of file TGRSIint.cxx.
References BLUE, TParserLibrary::CreateRawFile(), FileExists(), fRawFiles, fRawFilesOpened, TSingleton< TParserLibrary >::Get(), ProcessLine(), and RESET_COLOR.
Referenced by ApplyOptions().
| TFile * TGRSIint::OpenRootFile | ( | const std::string & | filename, | 
| Option_t * | opt = "read" ) | 
Opens root files provided on the command line. Also tells you where these files are stored (ie _file0). If these files are analysis or fragment trees, they are automatically chained into chains called gFragment and gAnalysis. Once this is complete, the TChannels, GValues and RunInfo are also read in.
Definition at line 313 of file TGRSIint.cxx.
References AddFileToGUI(), BLUE, fRootFilesOpened, gAnalysis, gFragment, TRunInfo::ReadInfoFromFile(), and RESET_COLOR.
Referenced by ApplyOptions(), TAnalysisHistLoop::OpenFile(), and TFragHistLoop::OpenFile().
      
  | 
  static | 
Prints the help. Not sure this is used anymore.
Definition at line 743 of file TGRSIint.cxx.
References BG_WHITE, DRED, and RESET_COLOR.
      
  | 
  override | 
Prints the GRSISort logo to terminal
Definition at line 285 of file TGRSIint.cxx.
References DrawLogo(), and ProgramName().
Referenced by TGRSIint().
      
  | 
  override | 
This takes over the native root command line. There are two main reasons for this
Definition at line 248 of file TGRSIint.cxx.
References DelayedProcessLine(), fIsTabComplete, and main_thread_id.
Referenced by DelayedProcessLine_Action(), OpenRawFile(), and RunMacroFile().
| void TGRSIint::RunMacroFile | ( | const std::string & | filename | ) | 
Runs a macro file. This happens when a .C file is provided on the command line
Definition at line 699 of file TGRSIint.cxx.
References FileExists(), and ProcessLine().
Referenced by ApplyOptions().
      
  | 
  private | 
Finds all of the files input as well as flags provided and makes all of the decisions about what to sort and what order to open everything up in. This also creates the output files. Starts the threads and gets the sorting going. This is really the brains of the command line sorting routine.
Definition at line 413 of file TGRSIint.cxx.
References TUnpackingLoop::AddGoodOutputQueue(), TDetBuildingLoop::AddOutputQueue(), TFragmentChainLoop::AddOutputQueue(), TGRSIOptions::AnalysisHistogramLib(), TGRSIOptions::AnalysisOptions(), TFragWriteLoop::BadInputQueue(), TUnpackingLoop::BadOutputQueue(), TDetectorInformation::BuildMode(), TGRSIOptions::CalInputFiles(), TGRSIOptions::CloseAfterSort(), StoppableThread::ColumnWidth(), TGRSIOptions::CreateFragmentDiagnostics(), DRED, TGRSIOptions::ExternalRunInfo(), FileExists(), fNewFragmentFile, TGRSIOptions::FragmentHistogramLib(), fRawFiles, gAnalysis, TAnalysisHistLoop::Get(), TAnalysisWriteLoop::Get(), TDataLoop::Get(), TDetBuildingLoop::Get(), TEventBuildingLoop::Get(), TFragDiagnosticsLoop::Get(), TFragHistLoop::Get(), TFragmentChainLoop::Get(), TFragWriteLoop::Get(), TGRSIOptions::Get(), TUnpackingLoop::Get(), TRunInfo::GetDetectorInformation(), GetRunNumber(), GetSubRunNumber(), gFragment, TGRSIOptions::InputFiles(), TAnalysisHistLoop::InputQueue(), TDetBuildingLoop::InputQueue(), TEventBuildingLoop::InputQueue(), TFragDiagnosticsLoop::InputQueue(), TFragHistLoop::InputQueue(), TFragWriteLoop::InputQueue(), TUnpackingLoop::InputQueue(), TEventBuildingLoop::kDefault, TGRSIOptions::MakeAnalysisTree(), TGRSIOptions::MakeHistos(), TEventBuildingLoop::OutOfOrderQueue(), TGRSIOptions::OutputAnalysisFile(), TGRSIOptions::OutputAnalysisHistogramFile(), TGRSIOptions::OutputDiagnosticsFile(), TGRSIOptions::OutputFragmentFile(), TGRSIOptions::OutputFragmentHistogramFile(), TDataLoop::OutputQueue(), TEventBuildingLoop::OutputQueue(), TAnalysisOptions::Print(), TChannel::ReadCalFile(), TRunInfo::ReadInfoFile(), GValue::ReadValFile(), RESET_COLOR, StoppableThread::ResumeAll(), TFragWriteLoop::ScalerInputQueue(), TUnpackingLoop::ScalerOutputQueue(), TDetectorInformation::Set(), TAnalysisHistLoop::SetOutputFilename(), TFragHistLoop::SetOutputFilename(), TRunInfo::SetRunInfo(), TDataLoop::SetSelfStopping(), TFragmentChainLoop::SetSelfStopping(), TEventBuildingLoop::SetSortDepth(), TGRSIOptions::SortDepth(), TGRSIOptions::SortRaw(), StoppableThread::StatusWidth(), TGRSIOptions::UseRnTuple(), TGRSIOptions::ValInputFiles(), and TGRSIOptions::WriteFragmentTree().
Referenced by ApplyOptions().
      
  | 
  override | 
Tries to do a tab completion. Returns false if unsuccsessful
Definition at line 239 of file TGRSIint.cxx.
References fIsTabComplete.
      
  | 
  override | 
Kills all of the threads if the process is allowed to terminate. This sends an error to TSortingDiagnostics if an analysis tree is being created
Definition at line 195 of file TGRSIint.cxx.
References TSingleton< TParsingDiagnostics >::Delete(), TSingleton< TPPG >::Delete(), TSingleton< TRunInfo >::Delete(), TSingleton< TSortingDiagnostics >::Delete(), TChannel::DeleteAllChannels(), TParserLibrary::DestroyRawFile(), fAllowedToTerminate, fRawFiles, TGRSIOptions::Get(), TSingleton< TParserLibrary >::Get(), TSingleton< TSortingDiagnostics >::Get(), LoopUntilDone(), TSortingDiagnostics::Print(), StoppableThread::SendStop(), and StoppableThread::StopAll().
Referenced by ApplyOptions(), and TGRSIInterruptHandler::Notify().
      
  | 
  private | 
Flag for shutting down GRSISort.
Definition at line 90 of file TGRSIint.h.
Referenced by LoopUntilDone(), and Terminate().
      
  | 
  private | 
this is used as a fake argc to pass to the TRint constructor
Definition at line 97 of file TGRSIint.h.
      
  | 
  staticprivate | 
      
  | 
  private | 
Flag for tab completion hook.
Definition at line 89 of file TGRSIint.h.
Referenced by ProcessLine(), and TabCompletionHook().
      
  | 
  private | 
Time of process.
Definition at line 84 of file TGRSIint.h.
      
  | 
  private | 
      
  | 
  private | 
List of Raw files opened.
Definition at line 95 of file TGRSIint.h.
Referenced by OpenRawFile(), SetupPipeline(), and Terminate().
      
  | 
  private | 
      
  | 
  private | 
Number of ROOT files opened.
Definition at line 91 of file TGRSIint.h.
Referenced by OpenRootFile().
      
  | 
  static | 
      
  | 
  private |