CEDRIC  Revision_backup-2009-02
PhastInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 2008 Boris Iven, Max Hermann
4  *
5  * This file is part of the "CEDRIC Event Display" application.
6  *
7  *****************************************************************************/
8 
9 #ifndef PHASTINTERFACE_H
10 #define PHASTINTERFACE_H
11 
12 #include "Phast.h"
13 
14 #include <string>
15 #include <list>
16 
17 
36 {
37 public:
38  std::list<int> getDetectorsByPrefix( const std::string& prefix ) const;
39 
41  void getDetectorNames( std::list<std::string>& names ) const;
42  typedef std::list<std::string> NameList;
43 
44  Phast* phast() { return m_phast; }
45 
46 
47  bool openMDST( std::string filename );
48  bool loadEvent( int i );
49 
50 
54  double getRICHRefractiveIndex( bool& fromMetaDB ) const;
55 
56 private:
57  Phast* m_phast;
58 
61 public:
62  static PhastInterface& ref() { static PhastInterface singleton; return singleton; }
63 private:
64  PhastInterface() { m_phast = new Phast; }
65  ~PhastInterface() { delete m_phast; }
66  PhastInterface( const PhastInterface& /*singleton*/ ) {}
67  PhastInterface& operator = ( const PhastInterface& /*singleton*/ ) { return *this; }
69 };
70 
71 #endif
std::list< std::string > NameList
Definition: PhastInterface.h:42
Singleton holding current Phast instance plus some comfort getters.
Definition: PhastInterface.h:35
std::list< int > getDetectorsByPrefix(const std::string &prefix) const
Definition: PhastInterface.cpp:15
void getDetectorNames(std::list< std::string > &names) const
Fill a list with all detector names.
Definition: PhastInterface.cpp:32
Phast * phast()
Definition: PhastInterface.h:44
bool loadEvent(int i)
Definition: PhastInterface.cpp:56
bool openMDST(std::string filename)
Definition: PhastInterface.cpp:42
double getRICHRefractiveIndex(bool &fromMetaDB) const
Definition: PhastInterface.cpp:75
static PhastInterface & ref()
Definition: PhastInterface.h:62