Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

infid_finder.cxx File Reference

#include "DataUtil/infid_finder.h"
#include <iostream>
#include <iomanip>
#include "TMath.h"
#include "Plex/PlexPlaneId.h"
#include "UgliGeometry/UgliGeomHandle.h"
#include "UgliGeometry/UgliPlnHandle.h"
#include <MessageService/Msg.h>
#include <MessageService/MsgService.h>

Go to the source code of this file.

Namespaces

namespace  FidVol

Functions

bool MsgLevel (const char *stream, const char *level)
 Set the stream's message level.
const char * GetMsgLevel (const char *stream)
 Get the stream's current level.
UgliPlnHandle fidvol_find_ugliplnhandle (PlexPlaneId plnid, std::vector< UgliPlnHandle > &plnv)
void fidvol_toggle_msglvl ()


Function Documentation

UgliPlnHandle fidvol_find_ugliplnhandle PlexPlaneId  plnid,
std::vector< UgliPlnHandle > &  plnv
 

Definition at line 49 of file infid_finder.cxx.

References UgliPlnHandle::GetPlexPlaneId().

Referenced by FidVol::infid_z_finder().

00051 {
00052   for (unsigned int i = 0; i < plnv.size(); ++i) {
00053     const UgliPlnHandle& uph = plnv[i];
00054     if (uph.GetPlexPlaneId() == plnid) return uph;
00055   }
00056   // fell through
00057   return UgliPlnHandle();
00058 }

void fidvol_toggle_msglvl  ) 
 

Definition at line 60 of file infid_finder.cxx.

References FidVol::GetMsgLevel(), and FidVol::MsgLevel().

Referenced by FidVol::infid_z_finder().

00061 {
00062   static const char* msglvl_dbi  = "Fatal";
00063   static const char* msglvl_ugli = "Fatal";
00064   static const char* msglvl_geo  = "Fatal";
00065 
00066   const char* curr_dbi  = FidVol::GetMsgLevel("Dbi");
00067   const char* curr_ugli = FidVol::GetMsgLevel("Ugli");
00068   const char* curr_geo  = FidVol::GetMsgLevel("Geo");
00069   FidVol::MsgLevel("Dbi",msglvl_dbi);
00070   FidVol::MsgLevel("Ugli",msglvl_ugli);
00071   FidVol::MsgLevel("Geo",msglvl_geo);
00072   msglvl_dbi  = curr_dbi;
00073   msglvl_ugli = curr_ugli;
00074   msglvl_geo  = curr_geo;
00075 }

const char * FidVol::GetMsgLevel const char *  stream  ) 
 

Get the stream's current level.

Definition at line 38 of file infid_finder.cxx.

References MsgStream::GetLogLevel(), MsgService::GetStream(), MsgService::Instance(), Msg::LevelAsString(), and s().

Referenced by fidvol_toggle_msglvl().

00039 {
00040     MsgStream *s = MsgService::Instance()->GetStream(stream);
00041     if (!s) return Msg::LevelAsString(Msg::kInfo); // default
00042     Msg::LogLevel_t lvl = s->GetLogLevel();
00043     if ( lvl < 0 ) return Msg::LevelAsString(Msg::kInfo); // default
00044     return Msg::LevelAsString(lvl);
00045 }

bool FidVol::MsgLevel const char *  stream,
const char *  level
 

Set the stream's message level.

Definition at line 28 of file infid_finder.cxx.

References Msg::GetLevelCode(), MsgService::GetStream(), MsgService::Instance(), s(), and MsgStream::SetLogLevel().

Referenced by fidvol_toggle_msglvl().

00029 {
00030     MsgStream *s = MsgService::Instance()->GetStream(stream);
00031     if (!s) return false;
00032     Msg::LogLevel_t lvl = Msg::GetLevelCode(level);
00033     if ( lvl < 0 ) return false;
00034     s->SetLogLevel(lvl);
00035     return true;
00036 }


Generated on Mon Feb 15 11:08:00 2010 for loon by  doxygen 1.3.9.1